package com.google.gwt.sample.dynatablerf.client.widgets;

import java.util.Iterator;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

public class GrifoMenuBar extends Composite implements HasWidgets {

	private VerticalPanel menuPanel;
	private VerticalPanel mainPanel;
	private VerticalPanel mascaraPanel;

	public GrifoMenuBar(HorizontalPanel header) {

		mainPanel = new VerticalPanel();
		mainPanel.add(header);

		mascaraPanel = new VerticalPanel();
		mainPanel.add(mascaraPanel);

		menuPanel = new VerticalPanel();
		mascaraPanel.add(menuPanel);
		initWidget(mainPanel);

	}

	@Override
	public void add(Widget w) {
		menuPanel.add(w);
	}

	@Override
	public void clear() {
		menuPanel.clear();

	}

	@Override
	public Iterator<Widget> iterator() {
		return menuPanel.iterator();
	}

	@Override
	public boolean remove(Widget w) {
		return menuPanel.remove(w);
	}

	public VerticalPanel getMenuPanel() {
		return menuPanel;
	}

	public VerticalPanel getMainPanel() {
		return mainPanel;
	}

	public VerticalPanel getMascaraPanel() {
		return mascaraPanel;
	}

}
